package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MpBusinessCardMapper;
import com.ruoyi.system.domain.MpBusinessCard;
import com.ruoyi.system.service.IMpBusinessCardService;

/**
 * 名片详情Service业务层处理
 * 
 * @author mcf
 * @date 2022-11-18
 */
@Service
public class MpBusinessCardServiceImpl implements IMpBusinessCardService 
{
    @Autowired
    private MpBusinessCardMapper mpBusinessCardMapper;

    /**
     * 查询名片详情
     * 
     * @param businessCardId 名片详情主键
     * @return 名片详情
     */
    @Override
    public MpBusinessCard selectMpBusinessCardByBusinessCardId(String businessCardId)
    {
        return mpBusinessCardMapper.selectMpBusinessCardByBusinessCardId(businessCardId);
    }

    /**
     * 查询名片详情列表
     * 
     * @param mpBusinessCard 名片详情
     * @return 名片详情
     */
    @Override
    public List<MpBusinessCard> selectMpBusinessCardList(MpBusinessCard mpBusinessCard)
    {
        return mpBusinessCardMapper.selectMpBusinessCardList(mpBusinessCard);
    }

    /**
     * 新增名片详情
     * 
     * @param mpBusinessCard 名片详情
     * @return 结果
     */
    @Override
    public int insertMpBusinessCard(MpBusinessCard mpBusinessCard)
    {
        mpBusinessCard.setCreateTime(DateUtils.getNowDate());
        return mpBusinessCardMapper.insertMpBusinessCard(mpBusinessCard);
    }

    /**
     * 修改名片详情
     * 
     * @param mpBusinessCard 名片详情
     * @return 结果
     */
    @Override
    public int updateMpBusinessCard(MpBusinessCard mpBusinessCard)
    {
        return mpBusinessCardMapper.updateMpBusinessCard(mpBusinessCard);
    }

    /**
     * 批量删除名片详情
     * 
     * @param businessCardIds 需要删除的名片详情主键
     * @return 结果
     */
    @Override
    public int deleteMpBusinessCardByBusinessCardIds(String[] businessCardIds)
    {
        return mpBusinessCardMapper.deleteMpBusinessCardByBusinessCardIds(businessCardIds);
    }

    /**
     * 删除名片详情信息
     * 
     * @param businessCardId 名片详情主键
     * @return 结果
     */
    @Override
    public int deleteMpBusinessCardByBusinessCardId(String businessCardId)
    {
        return mpBusinessCardMapper.deleteMpBusinessCardByBusinessCardId(businessCardId);
    }
}
